package com.boil.demo.ioc.car01;
// +-------------------------------------------------------------
// | Created by IntelliJ IDEA.
// +-------------------------------------------------------------
// | Author      : linhai
// +-------------------------------------------------------------
// | Date        : 2019-05-05 22:50
// +-------------------------------------------------------------
// | Description :
// +-------------------------------------------------------------

import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class TestCar {

    @Test
    public void TestCar01_1() {

        Car car = new Car();

        car.run();
    }

    @Test
    public void TestCar01_2() {

        ApplicationContext context =
                new ClassPathXmlApplicationContext("applicationContext01.xml");

        Car car = (Car) context.getBean("car");

        car.run();
    }
}
